package com.jishulianmeng.service;

import java.io.Serializable;
import java.util.List;

public interface IGenericService <T, PK extends Serializable> {
	
	public void add(T entity);
	
	public void del(java.io.Serializable id);
	
	public void update(T entity);
	
	public List<T> searchPage(String hql,int from,int max);
	
	public List<Object> doQuery(String hql);
	
	public T getObj(Serializable id);
	
	public int getTotalNumBySql(String str);
	
	public List<Object> searchSQLPage(String sql, int from, int max) ;
	
	public Object executeMySQL(final String sql);
	
	public void addBatch(List<T> entitys);
	
	public List<Object> searchBySql(String sql);

}
